from django.shortcuts import HttpResponse
from django.utils.deprecation import MiddlewareMixin

class MyMd1(MiddlewareMixin):

    def process_request(self, request):
        print("in1....")

    def process_response(self, request, response):
        print("out1....")
        # 将返回值返回
        return response

class MyMd2(MiddlewareMixin):

    def process_request(self, request):
        print("in2....")

    def process_response(self, request, response):
        print("out2....")
        # 将返回值返回
        return response

class MyMd3(MiddlewareMixin):

    def process_request(self, request):
        print("in3....")

    def process_response(self, request, response):
        print("out3....")
        # 将返回值返回
        return response